#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

class Point
{
	friend ostream& operator<<(ostream& out, const Point& p);
public:
	Point(double x = 0, double y = 0)
		:_x(x), _y(y)
	{}
	Point(const Point& p)
		:_x(p._x), _y(p._y)
	{}
	~Point()
	{
		_x = _y = 0;
	}
	void getter(double& ReturnX, double& ReturnY) const
	{
		ReturnX = _x;
		ReturnY = _y;
	}
	double GetPointX()const
	{
		return _x;
	}
	double GetPointY()const
	{
		return _y;
	}
	void setter(const double& x, const double& y)
	{
		_x = x;
		_y = y;
	}
	void operator=(const Point& p)
	{
		_x = p._x;
		_y = p._y;
	}
private:
	double _x;
	double _y;
};
ostream& operator<<(ostream& out, const Point& p)
{
	cout << "( " << p._x << ", " << p._y << " )";
	return out;
}
class Circle
{
	friend ostream& operator<<(ostream& out, const Circle& c);
public:
	Circle(const Point& p = Point(0, 0), double r = 1)
		:_p(p), _r(r)
	{}
	Circle(double x, double y, double r)
		:_p(Point(x, y)), _r(r)
	{}
	Circle(const Circle& c)
		:_p(c._p), _r(c._r)
	{}
	~Circle()
	{
		_p = Point(0, 0);
		_r = 0;
	}
	Point GetPoint()const
	{
		return _p;
	}
	double GetPerimeter()const
	{
		return 2 * PI*_r;
	}
	double GetArea()const
	{
		return PI*_r*_r;
	}

private:
	Point _p;
	double _r;
	const double PI = 3.1415926535;
};
ostream& operator<<(ostream& out, const Circle& c)
{
	cout << c._p <<" "<< c._r;
	return out;
}
int main()
{
	Circle c0;
	Circle c1(1, 1, 2);
	cout << c0 << endl << endl;
	cout << c1 << endl << endl;
	Circle c2(Point(5, 5), 2);
	Circle c3(c2);
	cout << c2 << endl;
	cout << c3 << endl << endl;

	cout << c3.GetPoint() << endl << endl;
	cout << c3.GetPerimeter() << endl << endl;
	cout << c1.GetArea() << endl << endl;

	return 0;
}

